﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using cmp = CurveMenuPanel;
using System.Windows.Browser;
namespace CurveMenu
{
	public partial class Page : UserControl
	{

        protected List<cmp.ItemData> data;
		public Page()
		{
			// Required to initialize variables
			InitializeComponent();
		}

		private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            data = new List<CurveMenuPanel.ItemData>();
            for (var i = 0; i < 16; i++)
            {
                cmp.ItemData itemData = new cmp.ItemData();
                itemData.id = i;
                itemData.imageUri = "img/" + i.ToString() + ".png";
                itemData.title = "图片" + i;
                data.Add(itemData);
            }

            mainPage.itemDataList = data;
            mainPage.buildScreen();
            (sender as Button).Visibility = Visibility.Collapsed;
		}

		private void TextBlock_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
		{
            HtmlPage.Window.Navigate(new Uri("http://nasa.cnblogs.com"), "_blank");
		}
	}
}